package com.ckzp.weixin.wxpay;

import com.ckzp.core.json.JsonUtil;

/**
 * Created by 51594 on 2019/12/2.
 */
public class PayData {

    public static PayData n() {
        return new PayData();
    }

    public static PayData n(int u_id) {
        return PayData.n().setU_id(u_id);
    }


    //用户
    public String open_id;

    //订单号
    public String trade_no;

    public String pre_bodys;

    public String pre_proid;

    public String pre_deviceid;

    public String pay_types = "JSAPI";

    public int u_id = 0;

    public int pre_fees = 0;

    public String getOpen_id() {
        return open_id;
    }

    public PayData setOpen_id(String open_id) {
        this.open_id = open_id;
        return this;
    }

    public String getTrade_no() {
        return trade_no;
    }

    public PayData setTrade_no(String trade_no) {
        this.trade_no = trade_no;
        return this;
    }

    public String getPre_bodys() {
        return pre_bodys;
    }

    public PayData setPre_bodys(String pre_bodys) {
        this.pre_bodys = pre_bodys;
        return this;
    }

    public String getPre_proid() {
        return pre_proid;
    }

    public PayData setPre_proid(String pre_proid) {
        this.pre_proid = pre_proid;
        return this;
    }

    public String getPre_deviceid() {
        return pre_deviceid;
    }

    public PayData setPre_deviceid(String pre_deviceid) {
        this.pre_deviceid = pre_deviceid;
        return this;
    }

    public int getU_id() {
        return u_id;
    }

    public PayData setU_id(int u_id) {
        this.u_id = u_id;
        return this;
    }

    public int getPre_fees() {
        return pre_fees;
    }

    public PayData setPre_fees(int pre_fees) {
        this.pre_fees = pre_fees;
        return this;
    }

    public String getPay_types() {
        return pay_types;
    }

    public PayData setPay_types(String pay_types) {
        this.pay_types = pay_types;
        return this;
    }

    @Override
    public String toString() {
        return "PayData{" +
                "open_id='" + open_id + '\'' +
                ", trade_no='" + trade_no + '\'' +
                ", pre_bodys='" + pre_bodys + '\'' +
                ", pre_proid='" + pre_proid + '\'' +
                ", pre_deviceid='" + pre_deviceid + '\'' +
                ", pay_types='" + pay_types + '\'' +
                ", u_id=" + u_id +
                ", pre_fees=" + pre_fees +
                '}';
    }

    public String toJson() {
        return JsonUtil.toJsonString(this);
    }
}
